package com.zw.a.basic.a07.demo07_teacher_exercise;

//父类, 表示老师类.
public abstract class Teacher {
    //属性.
    private String name;
    private int age;

    //构造方法
    public Teacher() {
    }

    public Teacher(String name, int age) {
        this.name = name;
        this.age = age;
    }

    //getXxx(), setXxx()
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    //行为
    //抽象方法, 讲课.
    public abstract void teach();
}
